import { useMutation } from "@tanstack/react-query";
import { request } from "../api/request";
import { VRLOGIN_URL } from "../constants/url";
const vrLoginFn = async ({ vertifyCode, verToken }) => {
  const { data } = await request({
    url: VRLOGIN_URL,
    method: "get",
    params: {
      code: vertifyCode,
      token: verToken,
    },
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
  return {
    data,
  };
};
export default function useVrLogin() {
  return useMutation(["vrLogin"], vrLoginFn);
}
